<template>
  <div class="block">
    <el-date-picker v-model="dtValue" ref="date" type="date" placeholder="选择日期"></el-date-picker>
  </div>
</template>
<script>
import Vue from 'vue'

export default {
  data() {
    return { dtValue: true, cancelBeforeStart: true }
  },
  methods: {
    getValue() {
      return this.dtValue
    },
    isCancelBeforeStart() {
      return this.cancelBeforeStart
    }
  },
  created() {
    this.dtValue = this.params.value
    this.cancelBeforeStart = false
  },
  mounted() {
    Vue.nextTick(() => {
      this.$refs.date.focus()
    })
  }
}
</script>
